use serde::{Deserialize, Serialize};
use utoipa::ToSchema;

use super::project_weather::ProjectWeather;

#[derive(Debug, Clone, Serialize, Deserialize, ToSchema, Default)]
#[serde(rename_all = "camelCase")]
pub struct Project {
    pub id: i32,
    pub data_directory: String,
    pub project_name: String,
    pub data_time_cap: i32,
    pub temperature: f64,
    pub wind_direction: f64,
    pub wind_speed: f64,
    pub weather_setting_mode: String,
    #[serde(default)]
    pub weather_data: Vec<ProjectWeather>,
    pub enable_ftp: bool,
    pub host: Option<String>,
    pub password: Option<String>,
    pub root_folder: Option<String>,
    pub user_name: Option<String>,
    pub start_time: Option<i64>,
    pub end_time: Option<i64>,
    #[serde(default)]
    pub station_ids: Vec<i32>,
    pub is_experiment: bool,
    #[serde(default)]
    pub preprocess_ids: Vec<i32>,
    #[serde(default)]
    pub direction_ids: Vec<i32>,
    #[serde(default)]
    pub location_ids: Vec<i32>,
    pub status: String,
    pub data_source: Option<String>,
    pub mock_speed: f64,
}
